/**
 * 视图界面基类
 * @returns {BaseView}
 */
BaseView = function()
{
	Sprite.call( this );
	
	this._bg ;
	this._logo;
	this._hero;
	this._hint; 
	this.addEventListener(Event.ADDED_TO_STAGE , this.addedToStageHandler );
};
FLASH.extend( BaseView , Sprite);
//BaseView.prototype = new Sprite();
//BaseView.prototype.constructor = BaseView ;

BaseView.prototype.addedToStageHandler = function(e)
{
	var target = e.getTarget();
	
	target.removeEventListener(Event.ADDED_TO_STAGE , target.addedToStageHandler );

	target._bg = new Bitmap(ResManager.getInstance().getBmdByName("splash-bg"));
	target.addChild(target._bg);

	target._logo = new  Bitmap(ResManager.getInstance().getBmdByName("logo-splash") );
	target._logo.setX( (GameSetting.SCENE_WIDTH-target._logo.getWidth())>>1 );
	target.addChild(target._logo);

	target._hero = new Bitmap(ResManager.getInstance().getBmdByName("deer-large"));
	target._hero.setX( ((GameSetting.SCENE_WIDTH-target._hero.getWidth())>>1 ) +70 );
	target._hero.setY( ( (GameSetting.SCENE_HEIGHT-target._hero.getHeight())>>1)+40 );
	target.addChild(target._hero);

	target._hint = new Bitmap( ResManager.getInstance().getBmdByName("hint-back1")  );   
	target._hint.setX( (GameSetting.SCENE_WIDTH-target._hint.getWidth())>>1 );
	target.addChild(target._hint);
	
	target.init();
};

//子类重写
BaseView.prototype.init = function()
{
	
};

/**
 * 释放资源
 * @param e
 */
BaseView.prototype.dispose = function()
{
	Sprite.prototype.dispose.call(this);
	this._bg = null ;
	this._logo = null ;
	this._hero = null ;
	this._hint = null ;
};